From 3c81b916ea0f71ff83ca02ed1d9c1c3aa7ea435e Mon Sep 17 00:00:00 2001 From: Stefan Kratochwil Date: Tue, 3 Dec 2024 21:25:02 +0100 Subject: [PATCH] Being more pythonesk. --- software/src/mfrc522/main.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/software/src/mfrc522/main.py b/software/src/mfrc522/main.py index ab16b59..5d86b86 100644 --- a/software/src/mfrc522/main.py +++ b/software/src/mfrc522/main.py @@ -3,10 +3,7 @@ import asyncio def uid_to_string(uid: list): - uid_string = "0x" - for i in uid: - uid_string += f'{i:02x}' - return uid_string + return '0x' + ''.join(f'{i:02x}' for i in uid) async def get_tag_uid(reader: MFRC522, poll_interval_ms: int = 50) -> list: