Write a Python function to get OS name & platform using os & platform library


Topic: Write a Python function to get OS name & platform using os & platform library

Solution

import os
import platform
def get_info():
    return f'OS: {os.name}\n Platform: {platform.system}'



List all Python Programs