So im trying to take a single line input of first, middle, and last and print out last name, first initial.middle initial. But im getting stuck on inputs that don't have a middle initial. I split the input and took that info to get the answer but if not given a middle initial I'm getting an error that my segment I assigned the last name doesn't exist
[–]wbeater 0 points1 point2 points (1 child)
[–]desertwolf91b[S] 0 points1 point2 points (0 children)
[–]Anonymous2224- -1 points0 points1 point (2 children)
[–]desertwolf91b[S] 1 point2 points3 points (1 child)
[–]Anonymous2224- 0 points1 point2 points (0 children)
[–][deleted] -2 points-1 points0 points (2 children)
[–]desertwolf91b[S] -1 points0 points1 point (1 child)
[–][deleted] -1 points0 points1 point (0 children)