0

Can anyone help me please in making a python program for printing the middle name of an entered name.

Python programs.

24th Oct 2019, 4:28 AM
Shreeyansh Singh
Shreeyansh Singh - avatar
4 Answers
+ 3
print(input().split()[1])
25th Oct 2019, 3:08 AM
David Ashton
David Ashton - avatar
+ 2
Hints: ● Get input and act properly when it is empty. ● Split the input by space. ● See if there's exactly 3 parts produced by splitting. Notify user for invalid input when there's less than or more than 3 parts resulted by split. ● Return the second part of the split result.
24th Oct 2019, 6:45 AM
Ipang
0
Could u plz help me by giving the codes.!! And Md Sahil we have to get name inputed so we don't have idea about the index!! Or could u help me with code!! Thankyou😀😀
24th Oct 2019, 5:16 PM
Shreeyansh Singh
Shreeyansh Singh - avatar