lazygoat644

  • {{ item.name }}
  • 首页
  • 阅读笔记
  • 写的东西
  • 技术
  • 有趣的论文
  • 音乐
  • 友情链接
  • Bilibili
  • Instagram
  • RSS

python编程从入门到实践(2)

  • lg644
  • 2019-10-02
  • 0

第二章 变量和简单数据类型

print("\tPython")
print("Languages:\nPython\nC\nJavaScript")
print("Languages:\n\tPython\n\tC\n\tJavaScript")

favorite_language= 'python '
print(favorite_language)
favorite_language.rstrip()
favorite_language


msg = "hello, \"he said.\" "
print(msg)

username = "lazygoat"
words = "bye-bye."
fullstc = username + ', ' + words
print(fullstc)

name = "haha hello"
print(name.upper())
print(name.lower())
print(name.title())

age = 23
# msg = "happy " + age + "rd birthday!"
msg = "happy " + str(age) + "rd birthday!"
print(msg)

print(5 + 3)
print(2 * 4)
print(2 ** 3)
print(16 // 2)
print(16 - 8)

import this
© 2022 lazygoat644 . 闽ICP备17015558号-1
Theme by Wing