Cov txheej txheem:

Puas yog sau hom ntaub ntawv hauv Python?
Puas yog sau hom ntaub ntawv hauv Python?

Video: Puas yog sau hom ntaub ntawv hauv Python?

Video: Puas yog sau hom ntaub ntawv hauv Python?
Video: Data Science with Python! Joining Tables Without a Common Column 2024, Kaum ib hlis
Anonim

Sau npe . Cov npe yog ib qho tseem ceeb heev variable type hauv Python . A lis tuaj yeem muaj cov khoom muaj nqis. Sau npe Cov kev hloov pauv tau tshaj tawm los ntawm kev siv cov kab ke hauv qab no sib txawv npe.

Kuj nug, dab tsi yog txhua hom ntaub ntawv hauv Python?

Basic Data Types hauv Python

  • Cov lej.
  • Floating-Point Numbers.
  • Cov zauv.
  • Cov hlua. Escape Sequences nyob rau hauv Strings. Raw Strings. Triple-quoted Strings.
  • Hom Boolean, Boolean Ntsiab Lus, thiab "Qhov tseeb"
  • Built-In muaj nuj nqi. lej. Hom Hloov. Iterables thiab Iterators. Cov ntaub ntawv sib xyaw. Chav Kawm, Tus Cwj Pwm, thiab Keeb Kwm. Input/Output.
  • Xaus.

Tsis tas li ntawd, cov npe puas tuaj yeem muaj cov ntaub ntawv sib txawv Python? Tsis muaj teeb meem, koj ua tau khaws ib qho hom hauv a lis tsis zoo li hauv "hnub qub" thaum lwm yam lus muaj arrays uas tsuas xav tau ib qho hom ntawm cov ntaub ntawv khaws cia rau hauv lawv.

Kuj Paub, Dab tsi yog 4 hom ntaub ntawv hauv Python?

Python txhawb nqa 4 hom ntaub ntawv tus lej

  • int (kos npe tus lej zoo li 10, 2, 29, thiab lwm yam)
  • ntev (cov lej ntev siv rau ntau qhov ntau dua ntawm qhov tseem ceeb xws li 908090800L, -0x1929292L, thiab lwm yam)
  • ntab (float yog siv los khaws cov naj npawb ntab ntab xws li 1.9, 9.902, 15.2, thiab lwm yam)
  • complex (xws li 2.14j, 2.0 + 2.3j, thiab lwm yam)

Puas yog teem ib hom ntaub ntawv hauv Python?

Teeb . Hauv Python , Teeb yog ib phau ntawv uas tsis tau txiav txim hom ntaub ntawv uas yog iterable, mutable thiab tsis muaj duplicate ntsiab.

Pom zoo: