Date and time from a timestamp
Slice the date and the time of day out of an ISO timestamp like 2026-03-14T09:30:05Z, then rebuild it in the day.month.year format used in Poland and much of Europe.
Start the challengePractise what this example shows with these challenges.
Slice the date and the time of day out of an ISO timestamp like 2026-03-14T09:30:05Z, then rebuild it in the day.month.year format used in Poland and much of Europe.
Start the challengeA slice meant to take the number from the container tag CG-0042 gives -004. Predict it, work out where indexes start and where a slice ends, fix it, then slice a sample label yourself.
Start the challengeReplace all but the last four characters of an access code with * using len(), slicing and string repetition, then find a code inside a log line and mask it there before the line is saved.
Start the challengecode[0] = "X" stops with a TypeError, because Python strings can't be changed. Predict the crash, find out what methods and slices really give, build a new string instead, then swap a letter in the middle of a code.
Start the challengeStuck on this example or want to go further? Ask here, or see what others asked.
Log in to ask and reply.
Separate arguments with commas. They're passed on every Run as sys.argv[1:].
Log in or create a free account to save your code and share it with a link. Your code will be waiting here when you come back.