2021-10-04-Learning notes P-4, Python

本文探讨Python编程中关于对象的概念,包括行连接器和Python对象的特性。介绍了-id()和-type()函数,用于显示对象的地址码和类型。举例说明即使变量值相同,其内存地址也可能相同,进一步阐述了Python对象定义为具有特定类型和值的内存块。
摘要由CSDN通过智能技术生成

This article is the author's original, reproduced also please indicate the source.
This article only represents the author's own views, for reference only. If you have any objection, you are welcome to discuss.
Forrest
 

目录

1. Row connector

2. Object in python

-id()

-type()

-Example

Defination of object in python


1. Row connector

Row connector intend to connect two rows as one row in syntax.

Python 3.9.7 (v3.9.7:1016ef3790, Aug 30 2021, 16:25:35) 
[Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> print("row-connector")
row-connector
>>> string = "abcdefghijklmnopqrstuvwxyz"
>>> string
'abcdefghijklmnopqrstuvwxyz'
>>> string_ = "abcdefgh\"
SyntaxError: EOL while scanning string literal
>>> string2 = "abcdefgh\
ijklmnopqrstuvwxy\
z"
>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值