GOEDUHUB Online Courses || Last Batch Student's Projects || COVID-19 Projects(AI-ML) || Universities  ||  Placement Preparation  Subscribe our youtube channel
+91-7976731765 Free Online Tutorials || AI || ML || NLP ||  OpenCV || Python || DBMS || OOPs || DSA || Java || Linux/Unix ||  C Programming
1 like 2 dislike
862 views
in Python Programming by Goeduhub's Expert (8.1k points)
Write a Python program to find the list of words that are longer than n from a given list of words.

1 Answer

0 like 0 dislike
by Goeduhub's Expert (7.6k points)
edited by
 
Best answer

Ques. Write a Python program to find the list of words that are longer than n from a given list of words

Answer : 

Program : 

str=input("enter strings : ")

a=str.split(" ")

b=[]

n=int(input("enter value of n "))

for i in a:

    if (len(i)> n) :

        b.append(i)

print("list of words : ",b)

Output :  

enter strings : Goeduhub provide Summer, winter, regular training in Artificial Intelligence(AI), Machine Learning(ML), Deep Learning(DL), Python, Big Data Hadoop, Internet of Things(IoT), Cloud Computing, Salesforce, Embedded Systems & Robotics, Mobile Apps Development, Industial Automation(PLC-SCADA),AUTOCAD, MATLAB, Programming (PHP, Java, C, C++), Networks & Database.

enter value of n 7

list of words :  ['Goeduhub', 'training', 'Artificial', 'Intelligence(AI),', 'Learning(ML),', 'Learning(DL),', 'Internet', 'Things(IoT),', 'Computing,', 'Salesforce,', 'Embedded', 'Robotics,', 'Development,', 'Industial', 'Automation(PLC-SCADA),AUTOCAD,', 'Programming', 'Networks', 'Database.']

 Goeduhub:

About Us | Contact Us  © goeduhub.com Social::   |  | 
 Placements:   List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Important Lists: List of NITsList of IITsList of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG)College ReviewsCollege Fest, Events & WorkshopsKnowledge ShareTrainees/Interns After 15-04-2020
Exams & Cutoffs: JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs || Cutoff-GATECutoff_IIT-JEECS-ScopeECE ScopeEE-Scope
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
...