About 1,750,000 results
Open links in new tab
  1. How to make a proper name input program in python

    Jun 8, 2018 · For example, if I entered my name "jacob birkett", the output (and subsequent value of name would be "Jacob Birkett". Take a look at the documentation for str.isalpha() , str.strip() , str.replace() and str.title() .

  2. python - How do I get a user inputted variable into a sentence?

    Sep 24, 2014 · Here's a general example to show the concept which you can then apply to your homework: x = "foo" print("The word is {0}".format(x)) Also, no, a main function is not necessary.

  3. How to read sentence for sentence with Python | DaniWeb - DaniWeb

    I'm tryng to read sentence for sentence from an input with python: sentences = raw_input("Insert some sentences here: ") (For example: Hello, my name is Mattia)

  4. Python: Display your details like name, age, address in ... - w3resource

    Apr 16, 2025 · Write a Python program that accepts name, age, and address as input and displays them in uppercase. Write a script that asks for user details (name, age, address) and formats them into a JSON object. Write a function that takes a full name as input and returns the initials in uppercase.

  5. how to print "Hello [your_name]" in output screen of python?

    Mar 17, 2018 · So... if you want your string to be "hello [your name]" you need to put that inside the quotation marks to print it. it would look like this. print(""hello [your name]"")

  6. How to Parse a String in Python? - Python Guides

    Jan 27, 2025 · One of the most common ways to parse a string in Python is by using the split() method. The split() method allows you to split a string into a list of substrings based on a specified delimiter. Let’s take an example: text = "Hello, my name is Sarah. I live in Los Angeles." sentences = text.split(". ") Output:

  7. python - Extract information from sentence - Data Science Stack Exchange

    Nov 2, 2016 · I'm creating a simple chatbot. I want to obtain the information from the user response. An example scenario: Bot : Hi, what is your name? User: My name is Edwin. I wish to extract the name Edwin f...

  8. 93+ Python Programming Examples - codingem.com

    A keyword argument in Python is a function argument that has a name label attached to it. An example call to a function with a keyword argument can look like this: my_func(name="Jack") Let’s for example implement a function that takes student info as its argument. You can give it as many keyword arguments as you wish.

  9. Python Syntax with Examples

    Example of Python syntax. Output: The name you use to identify a function, module, class, variable, or any other object is called an Identifier. There are certain rules for creating these identifiers: The identifier can start with a letter: A-Z or a-z. …

  10. 1.5. Words and sentences in PythonPython for Everybody

    Words and sentences in Python¶ Unlike human languages, the Python vocabulary is actually pretty small. We call this “vocabulary” the “reserved words”. These are words that have very special meaning to Python. When Python sees these words in a Python program, they have one and only one meaning to Python.

  11. Some results have been removed
Refresh