Mid2 31st.a_Joining_Characters _Apple (AND) 31st.b_Remove_Character_from_String
31st.a
word="apple"
print(",".join(word))
#output:
a,p,p,l,e
31st.b
string="ubed"
user=input("Enter the element to remove: ")
new_string= ""
for i in string:
if i!=user:
new_string+=i
print(new_string)
#output:
Enter the element to remove: d
ube
Comments
Post a Comment