print (<item>), Displays <item> on the screen, input (<prompt>), Displays <prompt> on the screen and returns the line typed in, <fileid> = open (<filename>, "r"), Opens file for reading, for <line> in <fileid>:, Reads every line, one at a time, <alist> = <fileid>.readlines (), Returns a list where each item is a line from the file, <aline> = <fileid>.readline (), Returns a line from a file. Returns an empty string on the end of the file, <fileid> = open (<filename>, "w"), Opens a file for writing, <fileid> = open (<filename>, "a"), Opens a file for appending, <fileid>.writelines (<structure>), Writes <structure> to a file. <structure> is a list of strings, <fileid>.write (<aString>), Writes a single string to a file, <fileid>.close (), Closes file, len (<object>), Returns the length of the <object>, such as a string, one-dimensional or two-dimensional data sturcture, range (<start>, <stop>, <step>), Generates a list of numbers using <step>, beginning with ,start. and up to, but no including, <stop>. A negative value for <step> goes backwards, round (<x>, <n>), Rounds <x> to the number of <n> digits after the decimal (uses the 0.5 rule), <list>.append (<item>), Adds <item> to the end of the list, del <list>[<index>], Removes the item at <index> from list, <list>.insert (<index>, <item>), Inserts <item> just before an existing one at <index>, <aList> = list () / <aList> = [], Two methods of creating a list structure. Both are empty, import <library>, Imports the <library> module into the current program, <string>.upper (), Returns the original string in uppercase, <string>.isupper (), Returns True, if all characters are uppercase, <string>.split (<char>), Returns a list of all substrings in the original, using <char> as the separator, <string>.strip (<char>), Returns original string with all occurrences of <char> removed from the front and back, def <procname> ():, A procedure with no parameters, def <procname> (<paramA>, <paramB>):, A procedure with parameters, return (<value>), return the <value> to the main program
0%
Python 5 Commands (PLS revision)
แชร์
แชร์
โดย
Sscale
แก้ไขเนื้อหา
สั่งพิมพ์
ฝัง
เพิ่มเติม
กำหนด
ลีดเดอร์บอร์ด
แสดงเพิ่มขึ้น
แสดงน้อยลง
ลีดเดอร์บอร์ดนี้ตอนนี้เป็นส่วนตัว คลิก
แชร์
เพื่อทำให้เป็นสาธารณะ
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานโดยเจ้าของทรัพยากร
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานเนื่องจากตัวเลือกของคุณแตกต่างสำหรับเจ้าของทรัพยากร
แปลงกลับตัวเลือก
จับคู่
เป็นแม่แบบแบบเปิดที่ไม่ได้สร้างคะแนนสำหรับลีดเดอร์บอร์ด
ต้องลงชื่อเข้าใช้
สไตล์ภาพ
แบบ อักษร
ต้องสมัครสมาชิก
ตัวเลือก
สลับแม่แบบ
แสดงทั้งหมด
เปิดผลลัพธ์
คัดลอกลิงค์
คิวอาร์โค้ด
ลบ
คืนค่าการบันทึกอัตโนมัติ:
ใช่ไหม