get first letter of each word in string python

def abbrevName(name):
    xs = (name)
    name_list = xs.split()
    # print(name_list)

    first = name_list[0][0]
    second = name_list[1][0]

    return(first.upper() + "." + second.upper())
answer = abbrevName("Ozzie Smith")
print(answer) 

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
how to print the first letters in a string in python how to get the first alphabet in a string in python how to get the first alphabet of a string in python how to find first letter of string in python python how to get the first word of a string how to get first letter of each word in python get first word in string python how to get the first letters from a string in python get first letter of each word in list in python get first letter of each word from list in python get first letter in word in python how to print only the first letter from each word ina string pyhton how to print the first word of a string in python first letter of each word python get first word in string pyhton take first letter of a string python get the first word of a string ptyhon python return first letter of each word in string get the first letter of a word python python get 1st word from string first word of a string python string first letter python python get first word of a string python string first word how should i get the first word in each string python python string get first word python first letter of string how to get first letter in string python how to print the first letter of a string in python how to access first letter in string python how to take the first letter of a string in python python find first letter in string how to print a first letter in each word and second letter in each word of a sentence in python how to print a first letter in each word of a sentence in each string in python string first characters python python get the first word of a sentence get the first character in string python how to read the first letter of a string in python sting first word in python how to get the first letter of a word in python return the first word in a string python how to print first word of a string in python get first word of string python how to identify the first letter of a word in python how to print first letter of string in python python find method first letter in string how to find the first word in a string python first word in string python python string first character print first letter in word python python get first letters of string taking first letter from each word in a string how to read the first character of a word in python how to get the first letter in a string python find the first letter in a string python title the first letter of a string python how to read first letter in a string python get first word in sentence python print first letter of string python first letter in string python print print first character of every word in python python how to choose the first letter of a string getting the first letter of each word in python how to get the first letter of a word python first letter of a word in python python get first letter of string return first word of a string python python get first letter word extract first character from each word from string in python python take first letter of word python take first letter of string how to get first letter of string python python string first char python get first word from string print first word from a string python how to get the first letter of each word in a list python how to get first letter of a string in python how to find first char of word in python python how to get first letter of string python get first word in string find first letter in string python get first letter of string python how to print first letter of each word in python get the first letter of every element python how to find the first letter in a string python match first letter of every word in the string python print first letter of every word in the string python how to get the first letter of each word in python the first letter of each element in python how to get the first letter of a string in python how to get the first word in string python first letter of string python how to print the first letter of any string in python how to print the first word of any string in python how to get the first word in a string python first letter in string python get the first letter of string in sentence python get the first letter of string python return first letter of a string python get first letter of each word in string python
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source