[split] No Error, and No Output - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: [split] No Error, and No Output (/thread-19507.html) |
[split] No Error, and No Output - vishal2894 - Jul-02-2019 Hi Guys I am a beginner with Python, I am trying to execute a code, it says no error. But I am not getting the expected output. Can someone please help with it ? students = [] def get_students_titlecas(): for student in students: get_student_titlecase = student.title() return get_student_titlecase def print_student_title_case(): student_titlecase = get_students_titlecas() print(student_titlecase) def add_student(name, student_id=332): student = {"name": name, "student_id": student_id} students.append(student) student_list = get_students_titlecas() student_name = input("Enter the student name ") student_id = input("Enter the student ID ") add_student(student_name, student_id) print_student_title_case() RE: [split] No Error, and No Output - nilamo - Jul-02-2019 1) Don't hijack someone else's thread. Especially if your question is completely unrelated to theirs. 2) You've got some functions, but never call them. A function that ran without being called would be worthless. |