Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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()
 
PREVIOUS NEXT
Tagged: #otp #generator #python
ADD COMMENT
Topic
Name
5+2 =