Skip to content

Commit

Permalink
Remove backslashes from is_palindrome.py (#10169)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Oct 9, 2023
1 parent ba828fe commit 844270c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions data_structures/linked_list/is_palindrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ def is_palindrome_dict(head: ListNode | None) -> bool:
>>> is_palindrome_dict(ListNode(1, ListNode(2, ListNode(2, ListNode(1)))))
True
>>> is_palindrome_dict(\
ListNode(\
1, ListNode(2, ListNode(1, ListNode(3, ListNode(2, ListNode(1)))))))
>>> is_palindrome_dict(
... ListNode(
... 1, ListNode(2, ListNode(1, ListNode(3, ListNode(2, ListNode(1)))))
... )
... )
False
"""
if not head or not head.next_node:
Expand Down

0 comments on commit 844270c

Please sign in to comment.