Python 3 notes 16 input and output

Output format: python has two ways to output values: expression statement and print() function. The third way is to use the write() method of the file object. The standard output file can use sys Stdout reference. The str.format() function formats the output value. repr() and str() can convert the output value into a string (str(): the ...

Posted by daprezjer on Tue, 25 Jan 2022 12:03:00 +0100

Judgment and loop statements - logical operators

1, Introduce Through the comparison operator, we know that when comparing the size and equality of data, we can directly use >, <, = =,! =, > =<= To operate However, there are many times not only the simple comparison size, but also: and, or, No for instance: Adult and female Undergraduate or graduate Not a student under the age of ...

Posted by CurrierSites on Tue, 07 Dec 2021 05:13:38 +0100