'How to pass data / variable between multiple scripts in the same CodeBuild job

I have an AWS CodeBuild job that contains 2 scripts (a.py, b.py). In a.py, it will try to get some information and then b.py will need that information to do some tasks. Basically, I need to pass data from a.py to b.py. Is there a way for multiple scripts to communicate with each other in AWS Codebuild?

Example buildspec.yml

version: 0.1
...
phases:
  build:
    commands:
       python a.py
       python b.py
...


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source