Python Built-in Modules: Unterschied zwischen den Versionen

Aus MattWiki
Keine Bearbeitungszusammenfassung
K Matt verschob die Seite Python Modules nach Python Built-in Modules, ohne dabei eine Weiterleitung anzulegen
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
For more Python Basics see [[Python Basics]]
For more Python Basics see [[Python Basics]]


== Built-in Modules ==
== os - Operating System ==
 
=== os - Operating System ===


==== How to Clear the Console from a Python Script ====
==== How to Clear the Console from a Python Script ====
Zeile 13: Zeile 11:
[[Kategorie:Python]]
[[Kategorie:Python]]


=== Math ===
== Math ==
from math import inf, sqrt
from math import inf, sqrt


=== Heapq ===
== Heapq ==
from heapq import heappop, heappush
from heapq import heappop, heappush

Aktuelle Version vom 9. Februar 2025, 09:08 Uhr

For more Python Basics see Python Basics

os - Operating System

How to Clear the Console from a Python Script

 import os
 os.system('cls' if os.name == 'nt' else 'clear')

Math

from math import inf, sqrt

Heapq

from heapq import heappop, heappush