Example
Tuple Methods count and index
Tuples have only two methods: count() for counting and index() for searching.
Showing 21–30 of 233
Example
Tuples have only two methods: count() for counting and index() for searching.
Example
Accessing individual characters and text fragments. Zero-based indexing in Python.
Example
How to create text and join it in Python. Basics of working with strings.
Example
Operator ** for exponentiation and calculating roots in Python.
Example
Parameters sep and end let you control separator and line ending in print function.
Quiz
…quiz on Python variable scope: 15 questions on local and global variables, the global and nonlocal keywords, and nested functions.
Quiz
…beginner quiz on Python dictionaries: 15 questions on keys and values, get(), in, pop(), update(), loops and nested dictionaries. Instant answers.
Challenge
…or, then name the rule that fired with boolean variables and an if/elif chain.
Challenge
Read a file size in MB and a link speed in Mbit/s with input(), work out the transfer time without forgetting the 8 bits in a byte, show it in minutes and seconds, then count the ground station…
Quiz
…on indexing, slicing, append, insert, pop, remove, sorting and copying, with instant answers.