À text file contains alphanumeric text (say an. txt)
.Write a program that reads this text file and prints only the numbers or digits
from the file.
In python language
.
.
.
who will answer I will mark as brainliest
Answers
Answered by
15
fname = input("Enter file name: ")
with open(fname, 'r') as f:
for line in f:
words = line.split()
for i in words:
for letter in i:
if(letter.isdigit()):
print(letter)
Similar questions
Political Science,
2 months ago
World Languages,
2 months ago
Math,
5 months ago
Geography,
11 months ago