0
Python
How to translate this C++ code to Pyhton? Help. using namespace std; class Node { public: Ā Ā Ā Ā int roll; Ā Ā Ā Ā string Name; Ā Ā Ā Ā string Dept; Ā Ā Ā Ā int Marks; Ā Ā Ā Ā Node* next; }; Node* head = new Node(); bool check(int x) { Ā Ā Ā Ā if (head == NULL) Ā Ā Ā Ā Ā Ā Ā Ā return false; Ā Ā Ā Ā Node* t = new Node; Ā Ā Ā Ā t = head; Ā Ā Ā Ā while (t != NULL) { Ā Ā Ā Ā Ā Ā Ā Ā if (t->roll == x) Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā return true; Ā Ā Ā Ā Ā Ā Ā Ā t = t->next; Ā Ā Ā Ā } Ā Ā Ā Ā Ā return false; }
2 Answers