Remove backslashes from is_palindrome.py (#10169)

@SaiHarshaK Fixes https://github.com/TheAlgorithms/Python/pull/10081#discussion_r1349651289
This commit is contained in:
Christian Clauss 2023-10-09 19:42:07 +02:00 committed by GitHub
parent ba828fe621
commit 844270c6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: