User Tools

Site Tools


python_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
python_notes [2023/12/31 19:14] – [Chained comparisons] rajupython_notes [2024/01/03 22:15] (current) – [useful links] raju
Line 8: Line 8:
   * [[https://nedbatchelder.com/text/names.html | Facts and myths about Python names and values]] (nedbatchelder.com) - well explained.   * [[https://nedbatchelder.com/text/names.html | Facts and myths about Python names and values]] (nedbatchelder.com) - well explained.
  
 +==== links to documentation ====
 +
 +  * os.path.basename - https://docs.python.org/3/library/os.path.html#os.path.basename
 +  * continue statement - https://docs.python.org/3/reference/simple_stmts.html#the-continue-statement
 ==== validate inputs ==== ==== validate inputs ====
 Sample snippet: Sample snippet:
Line 172: Line 176:
 So ''3 < 4 == True'' is equivalent to ''3 < 4 and 4 == True'' which evaluates to ''True and False'' which turns out to be ''False''. So ''3 < 4 == True'' is equivalent to ''3 < 4 and 4 == True'' which evaluates to ''True and False'' which turns out to be ''False''.
  
-Ref:- https://docs.python.org/3/reference/expressions.html#comparisons+Ref:- 
 +  * https://docs.python.org/3/reference/expressions.html#comparisons - describes the above rule and also gives a list of comparison operators
  
 +==== List of comparison operators ====
 +<code>
 +"<" | ">" | "==" | ">=" | "<=" | "!="
 +| "is" ["not"] | ["not"] "in"
 +</code>
  
 +Ref:- https://docs.python.org/3/reference/expressions.html#comparisons
 ===== tasks ===== ===== tasks =====
   * [[get urls in a url]]   * [[get urls in a url]]
python_notes.1704050099.txt.gz · Last modified: 2023/12/31 19:14 by raju