Skip to content

Commit 380e2e6

Browse files
committed
Update funcWithSetsAndDict.rst
fix pp
1 parent d150d6f commit 380e2e6

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

_sources/functions/funcWithSetsAndDict.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -328,26 +328,26 @@ Sorting Sets
328328
-----
329329
def unique_characters(strings):
330330
=====
331-
# Initialize an empty set to store unique characters
331+
# Init an empty set
332332
unique_chars = set()
333333
=====
334-
# Iterate over each string in the list
334+
# Loop through the strings
335335
for string in strings:
336336
=====
337-
# Add all characters of the current string to the set
337+
# Add the chars in string
338338
unique_chars.update(string)
339339
=====
340-
# Add all characters of the current string to the set
340+
# Add the chars in string
341341
unique_chars.add(string) #paired
342342
=====
343-
# Convert the set to a sorted list
344-
sorted_unique_chars = sorted(unique_chars)
343+
# Convert to a sorted list
344+
sorted_chars = sorted(unique_chars)
345345
=====
346-
# Convert the set to a sorted list
347-
sorted_unique_chars = sort(unique_chars) #paired
346+
# Convert to a sorted list
347+
sorted_chars = sort(unique_chars) #paired
348348
=====
349-
# reurn the sorted list of unique characters
350-
return sorted_unique_chars
349+
# return the sorted list
350+
return sorted_chars
351351

352352

353353
Dictionaries

0 commit comments

Comments
 (0)