Python .a2b_uu()
Published Apr 27, 2024
Contribute to Docs
The .a2b_uu() function converts a single line of UUEncoded data back to binary and returns the binary data.
Syntax
binascii.a2b_uu(string)
string: This parameter represents the UUEncoded data intended for decoding back into binary format. Specifically, it should be a Unicode string containing only ASCII characters and conforming to the UUEncode format.
Example
import binascii# Inserting ASCII-encoded data in UUEncode formatencoded_data = '*0V]D96-A9&5M>0 \n'# Decoding the ASCII-encoded datadecoded_data = binascii.a2b_uu(encoded_data)# Printing the decoded messageprint(decoded_data)
The above example produces the following output:
b'Codecademy'
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Python on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours
- Learn the basics of Python 3.12, one of the most powerful, versatile, and in-demand programming languages today.
- With Certificate
- Beginner Friendly.24 hours