Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Python program that takes 2 words as input from the user and prints out a list containing the letters that the 2 words have in common

firstWord = input("Enter the First word: ").lower()
secondWord = input("Enter the Second word: ").lower()
print("----------------------")
hehe = []
for i in firstWord:
    for j in secondWord:
        if i == j:
            hehe.append(j)

print(hehe)
print("----------------------")
Comment

PREVIOUS NEXT
Code Example
Python :: annaul sum resample pandas 
Python :: matplotlib 3.0.3 wheel file 
Python :: cartesian product of a list python 
Python :: train test split pandas 
Python :: place a widget in a specific position in tkinter 
Python :: for loop for multiple scatter plots 
Python :: browse list python 
Python :: changes not showing on website server odoo 
Python :: python convert twitter id to date 
Python :: pyrogram 
Python :: lock window size tkinter 
Python :: removing new line character in python from dataframe 
Python :: group by count dataframe 
Python :: np.sort descending 
Python :: pandas dataframe aggregations 
Python :: get text from image python 
Python :: tag for deleting from a list in python 
Python :: anova in python 
Python :: how to know how much lines a file has using python 
Python :: python pandas how to load csv file 
Python :: how to plotting points on matplotlib 
Python :: numpy slice array into chunks 
Python :: virtual env in python 
Python :: check if a value in dataframe is nan 
Python :: add element to heap python 
Python :: dataframe describe in pandas problems 
Python :: python distance calculator 
Python :: python sort dataframe by one column 
Python :: how to import mnist dataset keras 
Python :: find common words in two lists python 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =