0
mess = str(input("Enter your password: "))
for f in range(10): 
    mess_arr.append(random.randint(33, 126))
for k in range(len(mess)):
    mess_arr.append(ord(str(mess[k])))
for r in range(10):
    for x in range(len(mess_arr)):
        mess_arr[x] = (pow(mess_arr[x], num_)) % 127
print(mess_arr)

this is my code, which is basically supposed to encrypt passwords, the thing is that everything going into the array is an int, but, when i run the code, the output always is the number it was supposed to be (i checked with a previous print in with the encryption of the array), however the number would be strung together with the letter L, for example: [83L, 109L, 104L, 58L, 85L, 96L, 107L, 86L, 46L, 107L, 34L, 38L, 77L, 99L, 39L, 27L, 53L, 96L, 56L, 46L]

i cannot for the life of me figure out where the L is coming from, but it's always there

raincloud
  • 21
  • 1
  • 8
  • Basically, there's nothing you can do to change the output (short of hacking the CPython source). `83L` and the others elements are all still numbers. Python 2 simply chooses to display large integers with a `L` suffix. See the answer to the duplicate above for more info. – Christian Dean Jan 17 '18 at 03:33
  • so since i my pc has Python 3, this shouldn't be an issue? also would it affect attempts to decrypt the info? – raincloud Jan 17 '18 at 04:04

0 Answers0