I am reading in a line from a text file using:
file = urllib2.urlopen(\"http://192.168.100.17/test.txt\").read().splitlines()
and output
I think this way is easier to read:
string = "when an unknown printer took a galley of type and scrambled it to make a type specimen book." length = 20 list_of_strings = [] for i in range(0, len(string), length): list_of_strings.append(string[i:length+i]) print(list_of_strings)