We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
def print_full_name(first, last):
k="Hello firstname lastname! You just delved into python."
k=k.split(" ")
for i in range(len(k)):
if k[i]=="firstname":
k[i]=first
elif k[i]=="lastname!":
k[i]=last+ "!"
j=" ".join(k)
print(j)
if name == 'main':
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
What's Your Name?
You are viewing a single comment's thread. Return to all comments →
def print_full_name(first, last): k="Hello firstname lastname! You just delved into python." k=k.split(" ") for i in range(len(k)): if k[i]=="firstname": k[i]=first elif k[i]=="lastname!": k[i]=last+ "!" j=" ".join(k) print(j)
if name == 'main':