print(ch, end=' ')
print()
* Print each byte in the byte array as a hexadecimal integer, with a space as the separator
* Encode the byte array as a Base64 string(`str`), and output the string
* Read another byte array from the console input, where the byte array is expressed as a hex string (`str`). The console input is:
6465616462656566
* Decode the hex string as the byte array (`bytes`)
* As the decoded byte array **happens to be** a UTF-8 (or, ASCII) encoded bytes, decode the byte array to the text string(`str`):
def decode_utf8(in_bytes:bytes)->str:
return in_bytes.decode(‘utf-8’)
* Print the decoded text string
In your `readme.pdf` file, apart from the general information, it should include:
* A figure representing the relationship between all the variables in your program with type `bytes` and `str`. Example here:
![](https://img-blog.csdnimg.cn/img_convert/ee5a78e3285f30181f368782128004b2.png)
The figure above is corresponding to the following code.
first_hex:str = input()
first_bytes:bytes = bytes.fromhex(first_hex)
##
##### solution code
import base64
def output_bytes(in_bytes: bytes):
for ch in in_bytes:
print(ch, end=’ ')
print()
def output_hex(in_bytes: bytes):
for ch in in_bytes:
print(hex(ch), end=’ ')
print()
def decode_utf8(in_bytes: bytes) -> str:
return in_bytes.decode(‘utf-8’)
print(“Enter a string str1:”)
str1: str = input()
byte_array: bytes = bytearray.fromhex(str1)
output_bytes(byte_array)
output_hex(byte_array)
encoded: bytes = base64.b64encode(byte_array)
print(encoded)
print(“Enter a string str2:”)
str2: str = input()
byte_array2: bytes = bytearray.fromhex(str2)
str3: str = decode_utf8(byte_array2)
print(str3)
* output
Enter a string str1:
deadbeef
222 173 190 239
0xde 0xad 0xbe 0xef
b’3q2+7w==’
Enter a string str2:
4445414442454546
DEADBEEF
进程已结束,退出代码为 0
* operating system version:WIN10
* CPU instruction set:x64
* Python interpreter version:Python3.9
A screenshot of the console output of the program
![在这里插入图片描述](https://img-blog.csdnimg.cn/f4cdcae4b5694c12a697b41d9f7a78b8.png)
A figure representing the relationship between all the variables in your program
with type bytes and str:
![在这里插入图片描述](https://img-blog.csdnimg.cn/f10863a1b22b45baaf8d93b8802f2c56.png)
**自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。**
**深知大多数Python工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!**
**因此收集整理了一份《2024年Python开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。**
![img](https://img-blog.csdnimg.cn/img_convert/f2bcb0d2b2d42e63e2cb7236fce32ae1.png)
![img](https://img-blog.csdnimg.cn/img_convert/1f4b07ebd6f1d43b41c8e7dfd0d6c7d0.png)
![](https://img-blog.csdnimg.cn/img_convert/46506ae54be168b93cf63939786134ca.png)
![](https://img-blog.csdnimg.cn/img_convert/252731a671c1fb70aad5355a2c5eeff0.png)
![](https://img-blog.csdnimg.cn/img_convert/6c361282296f86381401c05e862fe4e9.png)
![](https://img-blog.csdnimg.cn/img_convert/9f49b566129f47b8a67243c1008edf79.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Python开发知识点,真正体系化!**
**由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新**
**如果你觉得这些内容对你有帮助,可以添加V获取:vip1024c (备注Python)**
![img](https://img-blog.csdnimg.cn/img_convert/e8d1dfa7d44398ad9ba0262e11a1f2cc.png)
做了那么多年开发,自学了很多门编程语言,我很明白学习资源对于学一门新语言的重要性,这些年也收藏了不少的Python干货,对我来说这些东西确实已经用不到了,但对于准备自学Python的人来说,或许它就是一个宝藏,可以给你省去很多的时间和精力。
别在网上瞎学了,我最近也做了一些资源的更新,只要你是我的粉丝,这期福利你都可拿走。
我先来介绍一下这些东西怎么用,文末抱走。
* * *
**(1)Python所有方向的学习路线(新版)**
这是我花了几天的时间去把Python所有方向的技术点做的整理,形成各个领域的知识点汇总,它的用处就在于,你可以按照上面的知识点去找对应的学习资源,保证自己学得较为全面。
最近我才对这些路线做了一下新的更新,知识体系更全面了。
![在这里插入图片描述](https://img-blog.csdnimg.cn/8fc093dcfa1f476694c574db1242c05b.png)
**(2)Python学习视频**
包含了Python入门、爬虫、数据分析和web开发的学习视频,总共100多个,虽然没有那么全面,但是对于入门来说是没问题的,学完这些之后,你可以按照我上面的学习路线去网上找其他的知识资源进行进阶。
![在这里插入图片描述](https://img-blog.csdnimg.cn/d66e3ad5592f4cdcb197de0dc0438ec5.png#pic_center)
**(3)100多个练手项目**
我们在看视频学习的时候,不能光动眼动脑不动手,比较科学的学习方法是在理解之后运用它们,这时候练手项目就很适合了,只是里面的项目比较多,水平也是参差不齐,大家可以挑自己能做的项目去练练。
![在这里插入图片描述](https://img-blog.csdnimg.cn/f5aeb4050ab547cf90b1a028d1aacb1d.png#pic_center)
**(4)200多本电子书**
这些年我也收藏了很多电子书,大概200多本,有时候带实体书不方便的话,我就会去打开电子书看看,书籍可不一定比视频教程差,尤其是权威的技术书籍。
基本上主流的和经典的都有,这里我就不放图了,版权问题,个人看看是没有问题的。
**(5)Python知识点汇总**
知识点汇总有点像学习路线,但与学习路线不同的点就在于,知识点汇总更为细致,里面包含了对具体知识点的简单说明,而我们的学习路线则更为抽象和简单,只是为了方便大家只是某个领域你应该学习哪些技术栈。
![在这里插入图片描述](https://img-blog.csdnimg.cn/c741a91b05a542ba9dc8abf2f2f4b1af.png)
**(6)其他资料**
还有其他的一些东西,比如说我自己出的Python入门图文类教程,没有电脑的时候用手机也可以学习知识,学会了理论之后再去敲代码实践验证,还有Python中文版的库资料、MySQL和HTML标签大全等等,这些都是可以送给粉丝们的东西。
![在这里插入图片描述](https://img-blog.csdnimg.cn/9fa77af248b84885a6ec779b2ead064d.png)
**这些都不是什么非常值钱的东西,但对于没有资源或者资源不是很好的学习者来说确实很不错,你要是用得到的话都可以直接抱走,关注过我的人都知道,这些都是可以拿到的。**
**一个人可以走的很快,但一群人才能走的更远。不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎扫码加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**
![img](https://img-blog.csdnimg.cn/img_convert/c03c41cc3ab4a5df58bd3b31a5ef5ea6.png)
的东西,但对于没有资源或者资源不是很好的学习者来说确实很不错,你要是用得到的话都可以直接抱走,关注过我的人都知道,这些都是可以拿到的。**
**一个人可以走的很快,但一群人才能走的更远。不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎扫码加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**
[外链图片转存中...(img-kTQ91Q9o-1712847479587)]