Answers for "python generate number from string"

6

python random string

import secrets 
secrets.token_hex(nbytes=16)

# this will produce something like 
# aa82d48e5bff564f3221d02194611c13
Posted by: Guest on August-11-2020
0

how to get a number from a string in python

string = "I am 14 years old"
for i in string.split():
  if i.isdigit():
    print(i)
print()
Posted by: Guest on February-11-2021

Code answers related to "python generate number from string"

Python Answers by Framework

Browse Popular Code Answers by Language