One simple way might be:
some_str=" " * 512000000
Seemed to work pretty well in my tests.
Edit: in Python 3, you might want to use bytearray(512000000) instead.
One simple way might be:
some_str=" " * 512000000
Seemed to work pretty well in my tests.
Edit: in Python 3, you might want to use bytearray(512000000) instead.