String - A string is a sequence of characters enclosed in single (' '), double (" "), or triple (''' or """) quotes. In Python, strings are used for text and can be manipulated in various ways., Indexing - Indexing refers to accessing individual characters in a string or elements in a sequence (e.g., a list) by their position. In Python, indexing starts at 0, String Concatenation - String concatenation is the process of combining two or more strings to create a new string. It can be done using the + operator., String Slicing - String slicing allows you to extract a portion of a string by specifying a range of indices. It is done using square brackets and colons, like string[start:end]., String Length - The length of a string is the number of characters it contains. You can find the length of a string using the len() function., String Functions - There are built-in functions in Python that allow you to perform various operations on strings, such as converting to uppercase, lowercasing, and searching for substrings., 1D Array (List) - A 1D array in Python is also known as a list. Unlike a Python List, an array is a collection of elements that are of the same data type. Arrays and Lists are stored in a linear sequence and accessed using indices., Array Indexing - Array indexing allows you to access individual elements in a list by their position. Similar to strings, list indexing starts at 0., Array Length - The length of an array is the number of elements it contains. You can find the length of a list using the len() function., Append - The append() function is used to add an element to the end of a list. It is commonly used to build lists dynamically., Iterating an array or string - Iteration is the process of looping through the elements of a string or a list. It allows you to perform actions on each element one at a time., String vs. List - Strings and lists are both sequences in Python, but strings contain characters, while lists can contain elements of various data types. Understanding the differences between them is important for effective programming.,

N5 Revision - Strings and 1D arrays

排行榜

闪存卡是一个开放式模板。它不会为排行榜生成分数。

视觉风格

选项

切换模板

恢复自动保存: