GeeksforGeeks
geeksforgeeks.org โบ python โบ python-string
Python String - GeeksforGeeks
It can include letters, numbers, symbols, and spaces. Python does not have a separate character type. A single character is treated as a string of length one.
Published ย January 14, 2026
python "string" module? - Stack Overflow
Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... So I'm reading this old module from I think around 2002 and it has this line "import string". Did Python require you to import a string module explicitly before to be able to use string type ... More on stackoverflow.com
A Simple struct-like Module with Variable-Length Strings, Intended for Networking
A friend and I have been developing a networking library for Python for more than a year now, and one of the features I'm excited about is an easy way to read and write binary wire protocols. The problem is... struct felt lacking to me. It's quite good at what it does, but its string handling made it unnecessarily hard to use. This is my attempt to solve that. NetStruct puts logic on top of struct that makes it possible to pack and unpack data with length encoded strings. I won't put any examples here, but the readme on github has several. More on reddit.com
subprocess modules and double quotes
Try subprocess.Popen('C:/plink.exe','username@remotehost','-P','228','-pw','password','ps aux | grep ssh']) More on reddit.com
how to time execution module function speed use timeit module.
Timer takes an optional second argument called setup, which is just a line of code to be executed before running the actual code to be timed. You can set up your imports there. >>> import timeit >>> t = timeit.Timer('math.hypot(3,4) > 5', 'import math') >>> t.timeit() 0.22089109069300378 You can also use the IPython %timeit magic, if you have IPython installed (you should!) - it gives you access to variables from your current context. In [1]: import math In [2]: %timeit math.hypot(3, 4) > 5 The slowest run took 36.20 times longer than the fastest. This could mean that an intermediate result is being cached. 1000000 loops, best of 3: 367 ns per loop More on reddit.com
Videos
03:13
[Newbie Bites] #48. String Module - YouTube
07:04
Unleashing the Power of Python's String Module: A Comprehensive ...
07:34
Python standard library: The "string" module - YouTube
24:37
17. Python String Functions & Methods, String Module | #python...
05:28
Python string methods ใฐ๏ธ - YouTube
18:38
Using the Python String Methods - YouTube
W3Schools
w3schools.com โบ python โบ python_ref_string.asp
Python String Methods
Python Overview Python Built-in Functions Python String Methods Python List Methods Python Dictionary Methods Python Tuple Methods Python Set Methods Python File Methods Python Keywords Python Exceptions Python Glossary ยท Built-in Modules Random Module Requests Module Statistics Module Math Module cMath Module
Programiz
programiz.com โบ python-programming โบ string
Python Strings (With Examples)
Python time Module ยท Python sleep() Precedence and Associativity of Operators in Python ยท Python Keywords and Identifiers ยท Python Asserts ยท Python Json ยท Python pip ยท Python *args and **kwargs ยท Python f-string ยท Python Variable Scope ยท Python Data Types ยท
Codecademy
codecademy.com โบ learn โบ learn-python-3 โบ modules โบ learn-python3-strings โบ cheatsheet
Learn Python 3: Strings Cheatsheet | Codecademy
The string method .title() returns the string in title case. With title case, the first character of each word is capitalized while the rest of the characters are lowercase. ... If no argument is passed, the default behavior is to split on whitespace. If an argument is passed to the method, that value is used as the delimiter on which to split the string. ... The Python string method .find() returns the index of the first occurrence of the string passed as the argument.
Python documentation
docs.python.org โบ 3 โบ library โบ stdtypes.html
Built-in Types โ Python 3.14.3 documentation
1 week ago - Strings also support two styles of string formatting, one providing a large degree of flexibility and customization (see str.format(), Format String Syntax and Custom String Formatting) and the other based on C printf style formatting that handles a narrower range of types and is slightly harder to use correctly, but is often faster for the cases it can handle (printf-style String Formatting). The Text Processing Services section of the standard library covers a number of other modules that provide various text related utilities (including regular expression support in the re module).
UC Berkeley Statistics
stat.berkeley.edu โบ ~spector โบ extension โบ python โบ notes โบ node75.html
Functions in the string module
Three functions are provided in the string module for removing whitespace from strings: lstrip, rstrip and strip which removing leading, trailing and both leading and trailing whitespace from a string, respectively.
O'Reilly
oreilly.com โบ library โบ view โบ python-standard-library โบ 0596000960 โบ ch01s07.html
The string Module - Python Standard Library [Book]
May 10, 2001 - The string Module The string module contains a number of functions to process standard Python strings, as shown in Example 1-51.Example 1-51. Using the string ModuleFile:... - Selection from Python Standard Library [Book]
Author ย Fredrik Lundh
Published ย 2001
Pages ย 304
W3Schools
w3schools.com โบ python โบ ref_module_string.asp
Python string Module
Python Overview Python Built-in Functions Python String Methods Python List Methods Python Dictionary Methods Python Tuple Methods Python Set Methods Python File Methods Python Keywords Python Exceptions Python Glossary ยท Built-in Modules Random Module Requests Module Statistics Module Math Module cMath Module
DigitalOcean
digitalocean.com โบ community โบ tutorials โบ python-string-module
Python String Module | DigitalOcean
August 3, 2022 - Python String module contains some constants, utility function, and classes for string manipulation. Itโs a built-in module and we have to import it before using any of its constants and classes.
Mimo
mimo.org โบ glossary โบ python โบ string
Python Strings: Essential Tips & Tricks | Learn Python Today
Python programs of any kind use strings to display, manipulate, or store text. ... Strings are essential for reading configuration files and extracting key-value pairs for application settings. ... In data science, strings are fundamental for cleaning and preparing data, such as stripping ...
Top answer 1 of 4
7
The string module contains a set of useful constants, such as ascii_letters and digits, and the module is often still imported for that reason.
2 of 4
6
If you see a import string but never see string.something, someone just forgot to remove an unused import.
While there did use to be some things in string that are now standard methods of str objects, you still had to either
- prefix them with
string.after importing the library, or - use
from string import <whatever>syntax.
Typically, the only times you'll see something properly imported but never "explicitly used" are from __future__ import with_statement or the like - the forwards/backwards compatability triggers used by Python for new language features.
LaunchCode
education.launchcode.org โบ lchs โบ chapters โบ strings โบ string-module.html
7.10. The string Module โ LaunchCode's LCHS documentation
The Python language gives us another means of working with string data. The Python string module provides several constants that are useful for checking to see if a character, slice, or string contains letters, digits, symbols, etc. To use these constants, we need to import the module into our code.