Skip to content
  • Blog (1)
  • About Us
  • Tags
  • Donations
1SMARTchicken - Code Made Easy
  • Tutorials (177)
  • Reference (2172)
  • Snippets (69)

Tag: Python String

1SMARTchicken - Code Made Easy

Tag: Python String

  • Tutorials (177)
  • Reference (2172)
  • Snippets (69)
  • Blog (1)
  • About Us
  • Tags
  • Donations
1SMARTchicken - Code Made Easy
  • Tutorials (177)
  • Reference (2172)
  • Snippets (69)
1SMARTchicken - Code Made Easy

Tag: Python String

  • Tutorials (177)
  • Reference (2172)
  • Snippets (69)
  • Home
  • Python String
Python Tutorials

Python – The Basics of Strings

December 9, 2024 / Python Tutorials, Tutorials / Python String, String

In Python, strings are surrounded by either single quotation marks, or double quotation marks. “Hello World” is the same as ‘Hello World’.

Python Tutorials

Python – Slicing Strings

December 9, 2024 / Python Tutorials, Tutorials / Python String, String

A range of characters can be returned from a string by using the slice syntax.

Python Tutorials

Python – Modifying Strings

December 9, 2024 / Python Tutorials, Tutorials / Python String, String

Python has a set of built-in methods that you can use to modify strings.

Python Tutorials

Python – String Concatenation

December 9, 2024 / Python Tutorials, Tutorials / Python String, String

To concatenate, or combine, two strings in Python, the + operator is used.

Python Tutorials

Python – Escaping Characters in a String

December 9, 2024 / Python Tutorials, Tutorials / Python String, String

To insert characters that will cause problems in a string, an escape character (backslash \ followed by the character you want to insert) is used.

Python Tutorials

Python – Formatting Strings

December 9, 2024 / Python Tutorials, Tutorials / Python String, String

To format a string, F-String is used by putting an f in front of the string literal and adding curly brackets {} as placeholders for variables/operations.

Python Tutorials

Python – Formatting Strings

May 15, 2025 / Python Tutorials, Tutorials / Python String, String

There are two ways to format strings in Python: Using F-strings (the preferred way since v3.6) and the format() method (older and less efficient).

Python Reference

Python – String capitalize() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string capitalize() method returns a string where the first character is upper case, and the rest is lower case.

Python Reference

Python – String casefold() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string casefold() method returns a string where all the characters are lower case.

Python Reference

Python – String center() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string center() method will center align the string, using a specified character (space is default) as the fill character.

Python Reference

Python – String count() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string count() method returns the number of times a specified value appears in the string.

Python Reference

Python – String encode() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string encode() method encodes the string using the specified encoding. If no encoding is specified, UTF-8 will be used.

Python Reference

Python – String endswith() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string endswith() method returns “True” if the string ends with the specified value, and “False” if it does not.

Python Reference

Python – String expandtabs() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string expandtabs() method sets the tab size to the specified number of whitespaces.

Python Reference

Python – String find() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string find() method finds the first occurrence of the specified value, and returns -1 if the value is not found.

Python Reference

Python – String format() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string format() method formats the specified value(s) and insert them inside the string’s placeholder and returns the formatted string.

Python Reference

Python – String index() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string index() method finds the first occurrence of the specified value, and raises an exception if the value is not found.

Python Reference

Python – String isalnum() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string isalnum() method returns True if all the characters are alphanumeric, meaning alphabet letter (a-z) and numbers (0-9).

Python Reference

Python – String isalpha() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string isalpha() method returns True if all the characters are alphabet letters (a-z).

Python Reference

Python – String isascii() Method

December 9, 2024 / Python Methods, Python Reference, Reference / Python String, Python String Method, String

The Python string isascii() method returns True if all the characters are ascii characters (a-z).

1 2 3 Next →

or View All Tags

Tutorials

  • HTML Tutorials (40)
  • CSS Tutorials (45)
    • CSS Flexbox (12)
  • JavaScript Tutorials (6)
  • jQuery Tutorials (13)
  • PHP Tutorials (0)
  • SQL Tutorials (0)
  • Python Tutorials (73)
    • Python File Handling (4)
    • Python and MySQL (5)
  • WordPress Tutorials (0)

Reference

  • HTML Reference (244)
    • HTML Tags (107)
    • HTML Attributes (46)
    • HTML Events (76)
    • HTML Resources (15)
  • CSS Reference (309)
    • CSS Selectors (55)
    • CSS Properties (220)
    • CSS Functions (17)
    • CSS Resources (17)
  • JavaScript Reference (555)
    • JavaScript Selectors (7)
    • JavaScript Operators (12)
    • JavaScript Statements (17)
    • JavaScript Methods (284)
    • JavaScript Properties (162)
    • JavaScript RegExp (45)
    • JavaScript Resources (28)
  • jQuery Reference (220)
    • jQuery Selectors (54)
    • jQuery Methods (140)
    • jQuery Ajax Methods (16)
    • jQuery Properties (17)
    • jQuery Resources (9)
  • PHP Reference (460)
    • PHP Keywords (59)
    • PHP Functions (400)
    • PHP Constants (0)
    • PHP Resources (1)
  • SQL Reference (290)
    • SQL Keywords (59)
    • MySQL Functions (138)
    • SQL Server Functions (83)
    • SQL Resources (10)
  • Python Reference (94)
    • Python Methods (86)
    • Python Resources (8)
  • WordPress Reference (0)

Snippets

  • HTML Snippets (3)
  • CSS Snippets (12)
  • JavaScript Snippets (5)
  • jQuery Snippets (8)
  • PHP Snippets (1)
  • SQL Snippets (3)
  • Python Snippets (1)
  • WordPress Snippets (36)
1SMARTchicken - Code Made Easy

333 Washington Blvd.
Suite 126
Marina del Rey, CA 90292
United States

contact2025@1smartchicken.com

  • About Us
  • Privacy Policy
  • Cookie Policy
  • Terms & Conditions

Search for Code:

or View All Tags

Copyright © 2025 1SMARTchicken | All Rights Reserved.