I am making a Simple Python Bot which can be run like python file.py . I created a Folder in my PC having 3 files file.py list.txt Procfile . In Procfile i wrote worker: python file.py , I choosed worker as it a Command Line application and my plan is to run that Python File forever on the server. Than i did git init , heroku git:remote -a py-bot-xyz where py-bot-xyz is the application which i created in My Heroku Dashboard and than git add ., git commit -am "make it better" & finally git push heroku master .
That's where the error occurs, that prints out


    remote: Compressing source files... done.
    remote: Building source:
    remote: 
    remote: 
    remote:  !     Push rejected, no Cedar-supported app detected
    remote: HINT: This occurs when Heroku cannot detect the buildpack
    remote:       to use for this application automatically.
    remote: See https://devcenter.heroku.com/articles/buildpacks
    remote: 
    remote: Verifying deploy....
    remote: 
    remote: !   Push rejected to py-bot-xyz.
    remote: 
    To https://git.heroku.com/py-bot-xyz.git
     ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'https://git.heroku.com/py-bot-xyz.git'


Now, when i go to Heroku's Dashboard Build Failed in Activity. What can i do now? :(((
To successfully push python code to heroku you should have a requirements.txt and a Procfile. Go to your project folder in terminal/commandline and enter the following commands which will generate the necessary files. Commit them and push should work.

pip freeze > requirements.txt(you might need to install pip, if using older python version)
echo "worker: python yourfile.py" > Procfile (worker could be replaced with web if it's a website)
Heroku Python Remote Rejected error