码迷,mamicode.com
首页 > 编程语言 > 详细

简明Python教程笔记(一)

时间:2014-06-24 17:05:23      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:字符串   python   

#!/usr/bin/env python
#Filename : helloworld.py
#The use of ‘and"  
print ‘hello,world!‘
print "hello,world!"


#The use of ‘‘‘and"""
print ‘‘‘This is a multi-line string. This is the first line.
This is the second line.
"What‘s your name?" I asked.
He said "Bond,James Bond."
‘‘‘
print """This is a multi-line string. This is the first line.
This is the second line.
"What‘s your name?" I asked.
He said "Bond,James Bond."
"""


#The use of Escape character \
print ‘What\‘s your name?‘
print "What‘s your name?"
#output \
print ‘\\ is the root path of linux system.‘
#Continuous lines when \ at the end of a line
print "What‘s your \
name?"
print "What‘s your name?"


#According to the literal meaning of concatenated string
print ‘What\‘s‘ ‘ your name?‘
#The use of u or U at command line output







本文出自 “1058223494” 博客,请务必保留此出处http://4708705.blog.51cto.com/4698705/1430057

简明Python教程笔记(一),布布扣,bubuko.com

简明Python教程笔记(一)

标签:字符串   python   

原文地址:http://4708705.blog.51cto.com/4698705/1430057

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!