otp generation in python code example
Example 1: how to make otp generator in python
# Python Program for simple OTP genertaor
import random as r
# function for otp generation
def otpgen():
otp=""
for i in range(4):
otp+=str(r.randint(1,9))
print ("Your One Time Password is ")
print (otp)
otpgen()
Example 2: otp generation in python
import random as r
i=100
while (i>=0):
print(r.randint(0,9000)+1000)
i=i-1