How to print all letters that are not common in two strings with Python

1 Answer

0 votes
s1 = "python"
s2 = "php"
 
lst = list(set(s1) ^ set(s2))
 
for ch in lst:
    print(ch)
     
     
     
'''
run:
 
t
n
y
o
 
'''

 



answered Sep 13, 2023 by avibootz
...