Advertisement
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, 8):
- for i in range(0, len(pi)):
- end_of = i + n
- num = pi[i:end_of]
- if num == str(end_of):
- print(num)
- if end_of > num: break
- """
- Pi: (1), (315), 360, 384, (1045794)
- Phi: 8, (20), 62, (466), (4854), 46914, 48949
- e: 62, (3999), 340616, (350954), (776064), (1382603), (1898195)
- 2Pi: (3), 79, (470), 816, 62180, 92253, (1493476)
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement