GRACE COE-CSE-GE3171-Problem Solving and Python Programming Laboratory-Ex9c

Pubblicato il: 04 aprile 2022
sul canale di: GRACE COLLEGE OF ENGINEERING
507
2

GRACE COE-CSE-GE3171-Problem Solving and Python Programming Laboratory-Ex9c- Implementing real-time/technical applications for longest word using File Handling
This video shows how to write a python program to implement real-time/technical applications for longest word using File Handling
PROGRAM:
def longest_word(filename):
with open(filename, 'r') as infile:
words = infile.read().split()
max_len = len(max(words, key=len))
return [word for word in words if len(word) == max_len]
print(longest_word('first.txt'))


In questa pagina del sito puoi guardare il video online GRACE COE-CSE-GE3171-Problem Solving and Python Programming Laboratory-Ex9c della durata di ore minuti seconda in buona qualità , che l'utente ha caricato GRACE COLLEGE OF ENGINEERING 04 aprile 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 507 volte e gli è piaciuto 2 spettatori. Buona visione!