Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pi = ''
- with open('/path/to/pi.txt') as the_file: pi = the_file.read() # This file should start without "3." in the front
- for n in range(1, 7):
- for i in range(0, len(pi)):
- end_of = i + n
- num = pi[i:end_of]
- d = int(num) * 2
- if d == end_of:
- print(num)
- """
- Pi: 5, 19, 94, 619, 61512
- Phi: 1, 3, 8, 331, 519, 1129, 44905, 49229, 66762
- e: 1, 2, 636, 637, 190853
- em: 2, 8, 12, 8403, 08403, 46466, 51309, 71069, 77172
- 2Pi: 92, 7084, 7212, 13485, 45163, 92165
- """
Advertisement
Add Comment
Please, Sign In to add comment