Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List=[[1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11, 12, 15]]
- [1, 2, 3]
- [4, 5, 6, 7]
- [8, 9, 10, 11, 12, 15]
- 1, 2, 3
- 4, 5, 6, 7
- 8, 9, 10, 11, 12, 15
- file.write(','.join(map(repr, List[i]))
- file.write(str(List[i]))
- '[' + ', '.join(map(repr, self)) + ']'
- ','.join(map(repr, self))
- import csv
- with open('/tmp/myfile.txt', 'w') as f:
- csv_writer = csv.writer(f)
- csv_writer.writerows(List)
- from __future__ import print_function # ignore if on py 3.x
- for line in List:
- print(*line, sep=',', file=file)
- print 'n'.join(','.join(map(str, x)) for x in List)
- print(fd.read().split('n')[:1])
- ['(information)']
- fd = open('examplefile.txt', 'r+')
- print(fd.read().split('n')[1-1])
- fd = open('examplefile.txt', 'r+')
- print(file2 = fd.read().split('n')[2-3])
- (information1)
- (information2)
- fd = open('examplefile.txt', 'r+')
- print(fd.read().split('n')[1-1])
- print(file2 = fd.read().split('n')[2-3])
- (information1)
Add Comment
Please, Sign In to add comment