Find common characters to help me fix my python code. Thank you. https://www.hackerrank.com/contests/filter-ece-1/challe

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Find common characters to help me fix my python code. Thank you. https://www.hackerrank.com/contests/filter-ece-1/challe

Post by answerhappygod »

Find common characters to help me fix my python code.
Thank you.
https://www.hackerrank.com/contests/fil ... rs/problem
s1=input()
s2=input()
a=list(set(s1)&set(s2))
for i in (a):
print(i,"", end="")
Find Common Characters To Help Me Fix My Python Code Thank You Https Www Hackerrank Com Contests Filter Ece 1 Challe 1
Find Common Characters To Help Me Fix My Python Code Thank You Https Www Hackerrank Com Contests Filter Ece 1 Challe 1 (57 KiB) Viewed 43 times
Read two strings from user. Identify the characters that are present in both the strings. Display these common characters. Input Format Submissions: 21 Max Score: 100 Difficulty: Hard Rate This Challenge: 2 character arrays Output Format More characters Sample Input elephant ear Sample Output ea Explanation Extract each character from the second string. Search for that character in the first string. If there are no common characters, print the message "no common characters". The letters in the output need to occur only once Python 3 1 2 1 input() 32 input) a=list(set(1)&set (52)) 5 for 1 in (a): print(1,"", end 7 Line: 1 Col: 1 Upload Code as File Test against custom input Run Code Submit Code Testcase 0 o Testcase 1 x 1 Your code did not pass this test case. Input (stdin) describe different Your Output (stdout) Expected Output dier
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply