TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #172 · 26 окт.

Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта. Вполне может заменить самостоятельно придуманную регулярку. >>> 'some_name'.isidentifier() True Обычное имя переменной >>> '私は手紙です'.isidentifier() True Юникод в качестве имени тоже доступен >>> '1_name'.isidentifier() False Имя не может начинаться с цифры >>> '੬_name'.isidentifier() False Включая все цифры юникода >>> 'some name'.isidentifier() False Пробелы недопустимы #basic

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #sequences

当前筛选 #sequences清除筛选
djangoproject

@djangoproject · Post #153 · 03.09.2016 г., 20:20

http://wla.berkeley.edu/~cs61a/fa11/lectures/streams.html In this chapter, we continue our discussion of real-world applications by developing new tools to process #sequential#data. In Chapter 2, we introduced a sequence interface, implemented in Python by built-in data types such as #tuple and #list. #Sequences supported two operations: querying their length and accessing an element by index. In Chapter 3, we developed a user-defined implementations of the sequence interface, the Rlist class for representing recursive lists. These sequence types proved effective for representing and accessing a wide variety of sequential #datasets.