Create a Large file for Test Data Processing using Python
Code Example # Create a Large file for Test Data Processing This below code will create 1.1GB .txt file import string from random import choice with open("large_data.txt", "w") as fp: i = 1 while i <= 1000000: word = (''.join( choice(string.ascii_uppercase + string.digits) for _ in range(10)) + "|" ) * 100 fp.write(word[:] + "\n") i += 1