User Tools

Site Tools


burim:python:python-labs:loesung_blatt5_aufgabe1_gemeinsame_zeichen1.py
word1 = input("Please enter word 1: ")
word2 = input("Please enter word 2: ")
common = ""
for letter in word1:
    if (letter in word2) and (letter not in common):
        common += letter
if common == "":
    print("The words do not share any characters.")
else:
    print("The words have the following characters in common:",
          common)
burim/python/python-labs/loesung_blatt5_aufgabe1_gemeinsame_zeichen1.py.txt · Last modified: 2019/01/21 20:55 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki