-3

So whenever I try to run this function there is a space between the two values i want to print can anyone help?

def initials():
    dot = "."
    f = input("first name: ")
    s = input("last name: ")
    print(f[0],dot,s[0])
    
    
initials()
khelwood
  • 55,782
  • 14
  • 81
  • 108

1 Answers1

0

A trailing comma will result in another space to be appended, but not with '+' operator.

Dorji Tshering
  • 893
  • 1
  • 6
  • 15