Python数据类型之整数和字符串常用功能

1、整数(int)

1)基本数据类型提供了许多内部调用方法,如__add__,其效果和加法一样,即整数在做加法时,会内部调用__add__方法来完成。带下划线的方法用的少,所以其带下划线方法可以忽略。

2、str类型

1)下面列出部分API解释。

str.capitalize() 
    Return a copy of the string with its first character capitalized and the rest lowercased.
    """首字母变大写"""

示例:
c = "chl"
print(c.capitalize())

结果:
Chl
str.center(width[, fillchar]) 
    Return centered in a string of length width. Padding is done using the specified fillchar (default is an ASCII space). The original string is returned if width is less than or equal to len(s).
    """内容居中,width:总长度,fillchar:空白处填充内容,默认无"""

示例:
a = "chl"
print(a.center(9, "*"))

结果:
***chl***
str.count(sub[, start[, end]]) 
    Return the number of non-overlapping occurrences of substring sub in the range [start, end]. Optional arguments start and end are interpreted as in slice notation.
    """计算子序列出现次数,sub:子序列,start和end:定义查找范围,默认整个字符串"""

示例:
a = "chl is chl"
print(a.count("chl", 0, 10))

结果:
2
str.endswith(suffix[, start[, end]]) 
    Return True if the string ends with the specified suffix, otherwise return False. suffix can also be a tuple of suffixes to look for. With optional start, test beginning at that position. With optional end, stop comparing at that position.
    """是否以XXX结尾,返回布尔值,start和end:定义查找范围,默认整个字符串"""
  
"""类似的有startswith,判断是否以XXX开头"""
示例: a
= "chl is chl" print(a.endswith("chl")) print(a.endswith("is", 0, 6)) 结果: True True
str.expandtabs(tabsize=8) 
    Return a copy of the string where all tab characters are replaced by one or more spaces, depending on the current column and the given tab size. Tab positions occur every tabsize characters (default is 8, giving tab positions at columns 0, 8, 16 and so on). To expand the string, the current column is set to zero and the string is examined character by character. If the character is a tab (\t), one or more space characters are inserted in the result until the current column is equal to the next tab position. (The tab character itself is not copied.) If the character is a newline (\n) or return (\r), it is copied and the current column is reset to zero. Any other character is copied unchanged and the current column is incremented by one regardless of how the character is represented when printed.
    """将制表符转换为空格,默认为8个空格"""

>>> '01\t012\t0123\t01234'.expandtabs()
'01      012     0123    01234'
>>> '01\t012\t0123\t01234'.expandtabs(4)
'01  012 0123    01234'

示例:
a = "chl\tis chl"
print(a.expandtabs())
print(a.expandtabs(20))

结果:
chl     is chl
chl                 is chl
str.find(sub[, start[, end]]) 
    Return the lowest index in the string where substring sub is found within the slice s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 if sub is not found.
    """查找子序列,返回第一个元素下标,如果没有找到返回-1,start和end:定义查找范围,默认整个字符串"""

Note
    The find() method should be used only if you need to know the position of sub. To check if sub is a substring or not, use the in operator:

>>> 'Py' in 'Python'
True

示例:
a = "chl is chl"
print(a.find("l"))
print(a.find("is", 2, 10))

结果:
2
4
str.format(*args, **kwargs) 
    Perform a string formatting operation. The string on which this method is called can contain literal text or replacement fields delimited by braces {}. Each replacement field contains either the numeric index of a positional argument, or the name of a keyword argument. Returns a copy of the string where each replacement field is replaced with the string value of the corresponding argument.
    """字符串格式化,动态参数"""

API示例:其中{0}称为占位符
>>> "The sum of 1 + 2 is {0}".format(1+2)
'The sum of 1 + 2 is 3'
str.index(sub[, start[, end]]) 
    Like find(), but raise ValueError when the substring is not found.
    """功能与find一样,只是找不到时报错"""

示例:
a = "chl is chl"
print(a.index("is"))
print(a.index("Hello"))

结果:
4
Traceback (most recent call last):
  File "E:/python/PyCharm setup/usr/test/test1.py", line 41, in <module>
    print(a.index("Hello"))
ValueError: substring not found
str.isalnum() 
    Return true if all characters in the string are alphanumeric and there is at least one character, false otherwise. A character c is alphanumeric if one of the following returns True: c.isalpha(), c.isdecimal(), c.isdigit(), or c.isnumeric().
    """判断字符串是否只包含数字和字母"""

示例:
a = "chl123456"
b = "chl******"
print(a.isalnum())
print(b.isalnum())

结果:
True
False
str.isalpha() 
    Return true if all characters in the string are alphabetic and there is at least one character, false otherwise. Alphabetic characters are those characters defined in the Unicode character database as “Letter”, i.e., those with general category property being one of “Lm”, “Lt”, “Lu”, “Ll”, or “Lo”. Note that this is different from the “Alphabetic” property defined in the Unicode Standard.
    """判断字符串是否都是字母"""
str.isdigit() 
    Return true if all characters in the string are digits and there is at least one character, false otherwise. Digits include decimal characters and digits that need special handling, such as the compatibility superscript digits. Formally, a digit is a character that has the property value Numeric_Type=Digit or Numeric_Type=Decimal.
    """判断字符串是否都是数字"""
str.islower() 
    Return true if all cased characters [4] in the string are lowercase and there is at least one cased character, false otherwise.
    """判断字符串是否都是小写字母"""
str.isspace() 
    Return true if there are only whitespace characters in the string and there is at least one character, false otherwise. Whitespace characters are those characters defined in the Unicode character database as “Other” or “Separator” and those with bidirectional property being one of “WS”, “B”, or “S”.
    """判断是不是空格"""
str.istitle() 
    Return true if the string is a titlecased string and there is at least one character, for example uppercase characters may only follow uncased characters and lowercase characters only cased ones. Return false otherwise.
    """判断是不是标题,即所有首字母都大写"""
str.isupper() 
    Return true if all cased characters [4] in the string are uppercase and there is at least one cased character, false otherwise.
     """判断字符串是否都是大写字母"""
str.join(iterable) 
    Return a string which is the concatenation of the strings in the iterable iterable. A TypeError will be raised if there are any non-string values in iterable, including bytes objects. The separator between elements is the string providing this method.
    """以指定字符串连接,参数是可序列化的"""

示例:
li = ["chl", "is", "chl"]
print("_".join(li))

结果:
chl_is_chl
str.ljust(width[, fillchar]) 
    Return the string left justified in a string of length width. Padding is done using the specified fillchar (default is an ASCII space). The original string is returned if width is less than or equal to len(s).
    """字符串左对齐,width:总宽度,fillchar:填充内容"""
  """类似的有rjust,字符串右对齐"""
示例: a = "chl" print(a.ljust(9, "*")) 结果: chl******
str.lower() 
    Return a copy of the string with all the cased characters [4] converted to lowercase.
    """字符串变小写"""
str.lstrip([chars]) 
    Return a copy of the string with leading characters removed. The chars argument is a string specifying the set of characters to be removed. If omitted or None, the chars argument defaults to removing whitespace. The chars argument is not a prefix; rather, all combinations of its values are stripped:
    """移除左边字符,默认为空格"""
  """类似的有rstrip,移除右边空白;strip,移除两端空白"""
API示例: >>> ' spacious '.lstrip() 'spacious ' >>> 'www.example.com'.lstrip('cmowz.') 'example.com'
str.partition(sep) 
    Split the string at the first occurrence of sep, and return a 3-tuple containing the part before the separator, the separator itself, and the part after the separator. If the separator is not found, return a 3-tuple containing the string itself, followed by two empty strings.
    """将字符串分割成前、中、后三部分,返回元组"""

示例:
a = "chl is chl"
print(a.partition("is"))

结果:
('chl ', 'is', ' chl')
str.replace(old, new[, count]) 
    Return a copy of the string with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
    """替换字符串,old:待替换字符串,new:新字符串,count:替换几个字符串"""

示例:
a = "chl is chl"
print(a.replace("chl", "ccc"))
print(a.replace("chl", "ccc", 1))

结果:
ccc is ccc
ccc is chl
str.rfind(sub[, start[, end]]) 
    Return the highest index in the string where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
    """与find类似,只是默认从右向左查找"""
str.split(sep=None, maxsplit=-1) 
    Return a list of the words in the string, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done (thus, the list will have at most maxsplit+1 elements). If maxsplit is not specified or -1, then there is no limit on the number of splits (all possible splits are made).
    """按字符分割字符串,默认为空格,maxsplit:分割多少次,返回列表"""
    """类似的有rsplit方法,从右向左分割"""

    If sep is given, consecutive delimiters are not grouped together and are deemed to delimit empty strings (for example, '1,,2'.split(',') returns ['1', '', '2']). The sep argument may consist of multiple characters (for example, '1<>2<>3'.split('<>') returns ['1', '2', '3']). Splitting an empty string with a specified separator returns [''].

For example:
>>> '1,2,3'.split(',')
['1', '2', '3']
>>> '1,2,3'.split(',', maxsplit=1)
['1', '2,3']
>>> '1,2,,3,'.split(',')
['1', '2', '', '3', '']

    If sep is not specified or is None, a different splitting algorithm is applied: runs of consecutive whitespace are regarded as a single separator, and the result will contain no empty strings at the start or end if the string has leading or trailing whitespace. Consequently, splitting an empty string or a string consisting of just whitespace with a None separator returns [].

For example:
>>> '1 2 3'.split()
['1', '2', '3']
>>> '1 2 3'.split(maxsplit=1)
['1', '2 3']
>>> '   1   2   3   '.split()
['1', '2', '3']
str.swapcase() 
    Return a copy of the string with uppercase characters converted to lowercase and vice versa. Note that it is not necessarily true that s.swapcase().swapcase() == s.
    """大写变小写,小写变大写"""
str.title() 
    Return a titlecased version of the string where words start with an uppercase character and the remaining characters are lowercase.
    """把字符串变成标题"""

For example:
>>> 'Hello world'.title()
'Hello World'
str.upper() 
    Return a copy of the string with all the cased characters [4] converted to uppercase. Note that str.upper().isupper() might be False if s contains uncased characters or if the Unicode category of the resulting character(s) is not “Lu” (Letter, uppercase), but e.g. “Lt” (Letter, titlecase).
    """变大写"""
str.zfill(width) 
    Return a copy of the string left filled with ASCII '0' digits to make a string of length width. A leading sign prefix ('+'/'-') is handled by inserting the padding after the sign character rather than before. The original string is returned if width is less than or equal to len(s).
    """返回指定长度的字符串,字符串右对齐,前面填充0"""

API示例:
>>> "42".zfill(5)
'00042'
>>> "-42".zfill(5)
'-0042'

~~~API走了一遍,留个大概印象~~~

2)字符串索引

示例:

a = "chl is chl"
print(a[0])

结果:

 c

3)字符串切片

示例:

a = "chl is chl"
print(a[0:5])

结果:

 chl i

4)字符串长度

示例:

a = "chl is chl"
print(len(a))

结果:

 10

转载于:https://www.cnblogs.com/chenhailing/p/7399584.html

Python数据类型、数字和字符串 python是一门面向对象的语言,因此它用来定义数据类型,包括其原始类型。像许多其他流行的编程语言一样,Python 中的字符串是表示 unicode 字符的字节数组。可以使用裁切语法返回一定范围的字符,指定开始索引和结束索引,以冒号分隔,以返回字符串的一部分。如需检查字符串中是否存在特定的短语或字符,可以使用in或not in关键字。但是,Python 没有字符数据类型,单个字符就是长度为 1 的字符串。变量可以存储不同类型的数据,并且不同类型可以执行不同的操作。注释:所有字符串方法都返回新值。... 阅读详情

相关推荐

别再对着数据手册发愁了!用HFSS 2023 R2搞定ESP32-C3板载天线的阻抗匹配

本文详细介绍了如何利用HFSS 2023 R2进行ESP32-C3板载天线的阻抗匹配优化,解决实际PCB设计中常见的性能偏差问题。通过智能模型导入、科学参数扫描和量化优化流程,显著提升天线性能,适用于WIFI和蓝牙应用场景。

weixin_42523543的博客 447

python之str.format()

找了老半天,format()方法还是难,于是找了找str.format(*args, **kwargs)Perform a string formatting operation. The string on which this method is called can contain literal text or replacement fields delimited by braces{...

qq_34907701的博客 1536

Cisco三层交换机的详细配置

** 本文适用于新手小白以及微微基础的同学来用于参考,实验是在Cisco Packet Tracer Student 进行,实验最终效果如图所示,所有命令配置与图中的一致。 使用到的机器型号为:五台电脑,一台服务器,三个普通交换机(2960型号),一个三层交换机(3560-24PS),两台普通服务器(2811) 文章目录一、什么是三层交换机二、配置交换机步骤1.配置二层交换机2.配置三层交换机3.配置两台路由器以及最后一台电脑 一、什么是三层交换机 1.三层交换机 = 三层路由+二层交换机 2.工作在

真正的大师,永远都怀着一颗学徒的心。 4万+

#python学习笔记(六)#最全的string method示例

目录 str.capitalize() str.casefold() str.center(width[,fillchar]) str.count(sub[,start[,end]]) str.encode(encoding='utf-8',errors='strict') str.endswith(suffix[,start[,end]]) str.expandtabs(tabsize=8) str.find(sub[,start[,end]]) str.forma...

weixin_38980061的博客 1954

MLNX_OFED 5.4-3.7.5.0 驱动安装:银河麒麟V10SP2 ARM 内核升级后编译避坑 3 步

本文详细介绍了在银河麒麟V10SP2 ARM环境下安装MLNX_OFED 5.4-3.7.5.0驱动的完整流程,包括内核升级后的驱动兼容性挑战、编译环境准备、分步编译与安装流程以及性能优化与故障排查。特别针对国产化ARM服务器(如华为Atlas系列)提供了实用的解决方案和常见问题处理建议,帮助用户顺利完成mlnx网卡驱动的安装与配置。

weixin_29184075的博客 403

Stanford Dogs 犬类识别实战:基于 YOLOv8 的 120 类目标检测与图形界面实现

本项目通过YOLOv8实现了Stanford Dogs数据集的目标检测功能,完整包含了数据准备、模型训练、检测推理、图形界面四大模块。初学者使用YOLOv8n(nano版)加速训练,熟悉流程后可切换到YOLOv8s/m。图像上传与检测可进一步增强,例如显示识别框、标注标签。可以添加模型选择、检测阈值调整等功能,提升实用性。通过网盘分享的文件:基于yolov8的狗类品种识别系统链接: https://pan.baidu.com/s/1UYV4h2WnK1RxWWKoPrS-RA?

FJN110的博客 84

python的关键字,数据类型、操作符、转义字符和格式化字符串

python的关键字: 布尔表达式:and/or/not  模块操作:from/import/as 条件控制: while/for/in/break if/elif/else 异常测试:try finally 声明全局变量 global 函数: 函数定义def      函数返回值return del  with  assert pass y

shanruo的专栏 591

Android性能分析——hprof文件分析(一)

hprof  文件是 Java 堆转储文件(Heap Dump File)的标准格式,用于保存 Java 虚拟机(JVM)在某个时间点的内存快照。这种文件对于分析内存泄漏、内存使用情况和对象分配模式非常有用。

小旭的专栏 1876

[Python] Python数据类型(一) 整数、浮点数和字符串

1.标识符和关键字: 为对象引用赋予的名称称为标识符,有效的标识符包括引导字符和后续字符,只要是Unicode编码的字母,都可以充当引导字符,后续字符可以是数字,下划线,或任意非空字符; 1.标识符大小写敏感; 2.标识符不能使用关键字; 3.标识符不能和预定义的标识符同名;如NameError… 4.关于下划线的使用,应避免名称的前后都有下划线_,因为Python在定义各种特殊方法时,...

FightFightFight的博客 7809

AI量化学习入门指南:从零开始掌握人工智能投资策略

量化投资:利用数学模型和计算机算法进行投资决策的方法算法交易:自动执行预定义交易规则的系统机器学习:让计算机从数据中学习并改进的技术回测:用历史数据检验交易策略表现的过程特征工程:将原始数据转化为模型可理解的输入过拟合:模型过度适应历史数据,导致未来表现不佳夏普比率:衡量单位风险所获得的超额收益AI量化投资不仅仅是技术的应用,更是一种理性、系统化的投资哲学。它不追求预测市场的每一个拐点,而是通过概率思维和风险管理,在不确定性的市场中寻找统计优势。

AGI×大数据,开启智能时代的认知跃迁;解码AGI,赋能数据驱动的智能革命。 1126

YOLO26改进策略【Head】| (独家改进)轻量化检测头:利用 EfficientNet 中的移动倒置瓶颈模块 MBConv 改进检测头

本文记录的是基于移动倒置瓶颈 MBConv 的 YOLO26 的检测头轻量化改进方法研究。采用了独特的倒置瓶颈结构,通过的操作以及,在高效提取特征的同时极大地降低了计算量。本文将的设计优势融入j检测头中,使其在目标检测任务中不仅能够更精准地识别各类目标,还能在计算资源有限的情况下快速响应,展现出更为卓越的实时检测能力。EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks的实现代码如下: 首先在代码中加入如下代码: 其

Limiiiing的博客 286

python整数类型帮助语句_python 基础二-----数据类型和控制语句

一、数据类型:1)数据类型1、整数(int)2、浮点数(float)3、字符串(string)4、列表(list)5、 元组(tuple)6、字典(dict): key和value是一一对应的,key必须是唯一的,字典是无序的元组和列表的区别:区别一:元组定义是() / list 定义是[]区别二:元组里面的元素只能读,无法增删改字典:dict = {}dict['one'] = "Thi...

weixin_33921444的博客 592

1.1什么是Zephyr?与FreeRTOSRT-Thread对比

我自己的项目里,三个系统都用过。这个芯片的原厂BSP哪个OS做得最靠谱?(实测,别看广告)项目核心需求是不是某个OS的“长板”?(别为了10%的功能牺牲90%的稳定性)团队三个月后能不能愉快地维护代码?(开发体验影响长期生产力)最后送一句干货:选型定不下来时,拿一块项目用的开发板,分别用三个OS跑同一个demo(比如按键控制LED+串口打印)。移植过程遇到的问题、代码看起来舒不舒服,你的直觉会告诉你答案。嵌入式没有完美解,只有适合当下的解。选好了,就踏实地写代码;

m0_50546716的博客 652

python数据类型有整数吗_Python数据类型之整数和字符串常用功能

1、整数(int)1)基本数据类型提供了许多内部调用方法,如__add__,其效果和加法一样,即整数在做加法时,会内部调用__add__方法来完成。带下划线的方法用的少,所以其带下划线方法可以忽略。2、str类型1)下面列出部分API解释。str.capitalize()Return a copy of the string with its first character capitalized...

weixin_39971435的博客 224

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

Python基础教程:运算符以及数据类型解析_python2中有两个整数类型int和long但python3中

整型的表现形式有四种,分别是二进制(0b开头),八进制(0o开头),十进制,十六进制(0x开头),进制之间的转换可以使用python中的内置函数(bin、oct、int、hex)。Python中的字符串通常使用单引号(‘’)或者双引号(“”)括起来,在字符串中可以使用反斜杠(\)进行转义,可以使用+好将两个字符串连接起来。元祖的格式,元祖使用一个括号括起来,元素之间的分割是用逗号(,),元组中也可以存放不同类型的数据。列表的格式,列表是写在[]中,使用逗号(,)进行元素间的分割。一.Number(数字)

2401_86449896的博客 667

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

python判断字符类型代码_python基础数据类型(示例代码)

今天,用一篇的篇幅来概括总结一下PYTHON基本数据类型。一.整数(int)与PYTHON2的较为混乱不同,PYTHON3大刀阔斧,将语言中所有的整数统一为"int"类型,大大提升了开发人员的的开发效率,也为初学者回避了不必要的麻烦。但,介于其单一的特性,可操作性也就难免容易被人忽略。在此,不做过多赘述。二.布尔值(boolean)其基于判断的特性以及只有二选一的取值,让人过目不忘。虽然,可操作性...

weixin_39639260的博客 1646

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

python逻辑型数据也叫做_Python运算符及基本数据类型

1、数字int(整型)在32位机器上,整数的位数为32位,取值范围为-2**31~2**31-1,即-2147483648~2147483647在64位系统上,整数的位数为64位,取值范围为-2**63~2**63-1,即-9223372036854775808~9223372036854775807关于int的常用方法:1.创建 例如:n=123 或 n=int(123)2.转变 例: ...

weixin_39703773的博客 221

数据类型、字符串

Python–JC.TWO(下) 数据类型 整数-- int 12345678 浮点数-- float 1.23 0.888 复数-- complex(1,2j) 高中数学 布尔值 – bool True(1) False(0) #type() 查看数据类型 字符串(str):’’ “” “”" 字符串拼接 + 拼接符 索引切片–下标 :从0开始 2586343198 索引:0123456789 先切片,给下标 索引位置 左闭右开(顾前不顾后) 字符串基本方法:

鱼头猫的博客 133

可以获取python整数类型帮助的是什么-python数据类型一(重点是字符串的各种操作)...

一、python基本数据类型1,int,整数,主要用来进行数学运算2,bool,布尔类型,判断真假,True,False3,str,字符串,可以保存少量数据并进行相应的操作(未来使用频率最高的一种类型)4,list,列表,用来存储大量数据,用[]表示(里面可以存放各种数据类型)5,tuple,元组,不可以发生改变,用()表示6,dict,字典,保存键值对,{key : value}也可以保存大量数...

weixin_37988176的博客 75

python可变数据类型 容器_Python最详细之数据类型讲解

Python教程栏目介绍相关数据类型相关免费学习推荐:python教程(视频)字符串字符串的坑:三引号的字符串如果中间没有双引号的字符串,会在解释器中输出为双引号三引号的字符串如果中间有双引号的字符串,会在解释器中输出为单引号字符串是存储在内存中字符串的操作:输入:input()输出:print()索引:str[index]取地址: id(str)切片:str[start: end: step] ...

weixin_39538536的博客 102

Python数据类型入门

本文介绍了Python中6种常用数据类型及其特点:整数(int)和浮点数(float)用于数值计算;字符串(str)处理文本;列表(list)是有序可变集合;元组(tuple)是不可变集合;字典(dict)通过键值对存储数据;集合(set)能自动去重。每种类型都配有生活化示例和代码演示,并提供了实用技巧,如类型转换、集合运算等。最后用口诀总结了各类型核心功能,帮助初学者快速掌握基础数据类型的使用场景和操作方法。

得塔云的博客 261

Python基础语法:变量和数据类型详解(整数、浮点数、字符串、布尔值)①

在Python编程中,变量和数据类型是基础中的基础。本文将深入探讨Python中的变量和几种主要的数据类型:整数、浮点数、字符串和布尔值。变量和数据类型是Python编程的基础,理解这些概念对于编写高效和正确的代码至关重要。通过本文的介绍,希望你能对Python中的变量和常用数据类型有一个清晰的认识,并能够在实际编程中灵活运用这些知识。类,包含账户号码、账户持有人和账户余额三个属性,以及存款、取款和显示账户信息的方法。在Python中,整数可以是正数、负数或零,并且没有大小限制,可以表示非常大的数字

结合项目案例,记录点点滴滴,自己回顾,分享他人o__o 1万+

整数是python的数据类型吗_什么是Python的字符串、整数和浮点数

现实世界中最常见的数字,文字,符号在python世界就是:【数据】。不同的数据类型,【长相】也不一样,各司其职。只有认清各类型数据的【长相】,了解它们的功能,才能在镜像世界里实现现实世界的任务。一、数据类型在现实世界的镜像——python里,最常用的数据类型有三种——字符串(str)、整数(int)和浮点数(float)。字符串首先,我们来认识一下字符串,字符串英文string,简写str。字符串...

weixin_39638105的博客 821

python基础:基本数据类型:整数,浮点数,字符串

基本数据类型介绍:整数,浮点数,字符串: 在介绍之前先来了解一个python在终端窗口运行的解释器,在你安装好python之后,运行终端命令行,输入python后回车,你会看到你的python版本以及提示信息和&amp;gt;&amp;gt;&amp;gt;等待输入,你可以在这里输入一条python语句来验证其正确性,这非常的方便。 例如图中我输入了print(“Python!”)它接下来的一行就输出了Python! ...

Dunkle.T的博客 2705
上一篇: JavaScript认识
下一篇: 定位
ablu56590
博客等级 码龄12年 4粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值