組み込み関数 all() 使い方 bool = all(iterable) すべての要素が真のときTrueを返します value1=all() print(value1) #結果 True value2=all() print(value2) ... 組み込み関数
組み込み関数 reversed() 使い方 reversed = reversed( iter ) 渡したiter の順番を逆にします list1 = for i in reversed(list1): print(i) #結果 5 4 3 2 ... 組み込み関数
組み込み関数 isinstance() 使い方 bool = isinstance( obj , type) objの型がtypeと一致した場合Trueが返ります bool1 = isinstance(111,int) print(bool1) #結果 Tru... 組み込み関数
組み込み関数 tuple() 使い方 tuple = tuple( iterable ) 渡したiterable をtupleに変換し返します list1 = tuple1 = tuple(list1) print(tuple1) #結果 (1, ... 組み込み関数
組み込み関数 ord() 使い方 int = ord( str ) 文字を与えるとUnicodeが戻ります複数の文字を与えるとエラーになります int1 = ord('a') print(int1) #結果 97 chr()... 組み込み関数
組み込み関数 next() 使い方 class = next( iterator ) イテレータの次の要素を取得します list1= iter1=iter(list1) for i in range(4): print(next(iter1... 組み込み関数
組み込み関数 help() 使い方 help(obj) objのヘルプを表示します help('abs') #結果 ''' Help on built-in function abs in module bu... 組み込み関数
組み込み関数 hash() 使い方 int =hash(tuple) tupleをハッシュ化して返します tuple1='dopy',777 hash(tuple1) #結果 604267554648750771 組み込み関数
組み込み関数 type() 使い方 type1 = type( obj ) 渡したobjのtypeを返します str1 = 'abc' type1 = type( str1 ) print(type1) #結果 <class ... 組み込み関数
組み込み関数 enumerate() 使い方 enumerate = enumerate(iterable) iterable を enumrate形式に変換します enumeate形式はタプルで連番が振られます list1= list2=list(e... 組み込み関数