mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-18 08:17:01 +00:00
Remove backslashes from is_palindrome.py (#10169)
@SaiHarshaK Fixes https://github.com/TheAlgorithms/Python/pull/10081#discussion_r1349651289
This commit is contained in:
parent
ba828fe621
commit
844270c6e9
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user