I managed. The answer is this format:
electrum paytomany '[["bc1qnp7d483d79j6pcx6rfc9yw46xrevplcxtuurhq",0.0001], ["bc1qt6enaefhrhue9q4hyszx4kn9zvqvucktruvh2q",0.0001]]'
this actually how json.dumps works and used in electrum code I find that trying to write it manually may cause some problems, so the easiest solution is to create a CSV file with the address, amount, and let's name this file P2M.csv, then write this code
import csv
input_file = csv.DictReader(open("/full/path/to/your/P2M.csv"))
// Full path
outputs = []
for row in input_file:
tup = (row["address"], float(row["amount"]))
outputs.append(tup)
print outputs
transaction = paytomany(outputs, 0.0004)
print transaction
0.0004 is mining fee you can change it or add raw_input to check transaction before sending it
To see more codes or code details above
https://github.com/ramuta/electrum-script-tutorial