Computer Science, asked by karansinghrk7735, 1 year ago

Write a program that prompt the user for a string. Extract all the digit from the string. If there are digit

Answers

Answered by ElskerElvishpy
0

Answer:

string = "Hello brother@#$6497946!."

digit = []

for char in string:

if char.isdigit():

 digit.append(char)

print( digit)

Explanation:

Similar questions