Advertisement
jacklin213

Untitled

Apr 4th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. def main():
  2.     # Input should be in the format "first_name last_name"
  3.     user_input = input("Enter name: ")
  4.     blank_position = user_input.find(" ")
  5.     # Bellow is an example of slicing strings, it changes the blank position of a first/last name into a $
  6.     user_input = user_input[:blank_position] + $ + user_input[blank_position + 1:]
  7.  
  8. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement