Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- print(encrypter(617534))
- def encrypter(key_In):
- k= int(key_In)
- list_key= list()
- for i in range(6):
- mod= k%10
- list_key[i]= mod
- k= k-mod
- k= k//10
- return list_key
- if __name__ == "__main__": main()
- ###################the traceback ################
- Traceback (most recent call last):
- File "encryter.py", line 17, in <module>
- if __name__ == "__main__": main()
- File "encryter.py", line 3, in main
- print(encrypter(617534))
- File "encryter.py", line 12, in encrypter
- list_key[i]= mod
- IndexError: list assignment index out of range
Add Comment
Please, Sign In to add comment