You are viewing a single comment's thread. Return to all comments →
I believe that if not x: = if x is None, meaning "if x does not exist". See: http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/boolean.html
if not x:
if x is None
Inspired by Kostyantin_Kon's code: https://www.hackerrank.com/challenges/merge-two-sorted-linked-lists/forum/comments/676928 I wrote my own version that also passes all testcases: https://www.hackerrank.com/challenges/merge-two-sorted-linked-lists/forum/comments/701319
Дякую за общую идею! Привет Украине!
Seems like cookies are disabled on this browser, please enable them to open this website
Merge two sorted linked lists
You are viewing a single comment's thread. Return to all comments →
I believe that
if not x:
=if x is None
, meaning "if x does not exist". See:http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/boolean.html
Inspired by Kostyantin_Kon's code:
https://www.hackerrank.com/challenges/merge-two-sorted-linked-lists/forum/comments/676928
I wrote my own version that also passes all testcases:
https://www.hackerrank.com/challenges/merge-two-sorted-linked-lists/forum/comments/701319
Дякую за общую идею! Привет Украине!